package o;

import android.os.Handler;
import android.os.Looper;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public final class fju {
    static final int ˋ = ((ˏ * 2) + 1);
    private static final fju ˎ = new fju();
    private static final int ˏ;
    static final int ॱ;
    private final Executor ˊ = new a();

    static class a implements Executor {
        private a() {
        }

        public final void execute(Runnable runnable) {
            new Handler(Looper.getMainLooper()).post(runnable);
        }
    }

    static {
        int availableProcessors = Runtime.getRuntime().availableProcessors();
        ˏ = availableProcessors;
        ॱ = availableProcessors + 1;
    }

    public static ExecutorService ˊ() {
        ExecutorService threadPoolExecutor = new ThreadPoolExecutor(ॱ, ˋ, 1, TimeUnit.SECONDS, new LinkedBlockingQueue());
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        return threadPoolExecutor;
    }

    public static Executor ˋ() {
        return ˎ.ˊ;
    }
}
